<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	xmlns:om="http://www.apusic.com/jsf/misc" renderKitId="AJAX" xmlns:epm="http://www.bp.com.cn/epm">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
		 	//<![CDATA[
		 	function refreshData(){
		     var store=securityUserGrid.getStore();
	         store.reload(store.lastOptions); 
    	     }
    	     function typeFormatter(v){
    	     	if(v == "uk"){
    	     		return "UK用户";
    	     	}	
    	     	return "普通用户";
    	     }
		     //]]>
		 </script>
	</w:head>
	<w:page title="用户一览">
		<layout:panel border="false" header="false" styleClass="k4-view" autoHeight="true"
			autoWidth="true">
			<layout:panel id="viewtoolbar" border="false" autoHeight="true" autoWidth="true">
				<w:form>
					<w:toolBar>
						<w:button label="新增"
							image="#{facesContext.externalContext.requestContextPath}/images/create.gif"
							id="createSecurityUser" immediate="true" />
					</w:toolBar>
				</w:form>
			</layout:panel>
			<layout:panel title="搜索条件" border="false" autoHeight="true" autoWidth="true" collapsible="true"
				collapsed="false" styleClass="k4-view-search">
				<w:form>
					<layout:panelGrid columns="4" styleClass="k4-view-search" cellpadding="0" cellspacing="0"
						border="1">
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="用户姓名" for="keywords" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField width="216" id="keywords" jsvar="keywordsJsvar"></w:textField>
						</layout:cell>
						<layout:cell colspan="2" styleClass="k4-form-fieldvalue">
							<layout:panelGrid columns="2" cellpadding="0" cellspacing="0">
								<w:button id="query" value="查询"
									image="#{facesContext.externalContext.requestContextPath}/images/search.gif" />
								<w:button id="reset" value="重置" immediate="true"
									image="#{facesContext.externalContext.requestContextPath}/images/clear.gif"
									onclick="keywordsJsvar.setValue('');" />
							</layout:panelGrid>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<w:dataGrid id="securityUserGrid" rows="15" paged="true" border="false" showRowNumber="true"
				styleClass="k4-view-datagrid" autoHeight="true" singleSelect="true" jsvar="securityUserGrid"
				toolBarPosition="bottom">
				<ajax:action event="ondblclick"
					action="#{system_securityUserListBean.showSecurityUser}" />
				<w:outputColumn id="fullname" header="用户姓名" width="100" sortable="true"></w:outputColumn>
				<w:outputColumn id="username" header="登录用户名" width="150"></w:outputColumn>
				<w:outputColumn id="loginType" header="用户类型" width="150" clientFormatter="typeFormatter"></w:outputColumn>
				<w:outputColumn id="enabled" header="是否有效" converter="yesNoFormatter"></w:outputColumn>
				<w:pagingToolbar for="securityUserGrid" displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
			</w:dataGrid>
		</layout:panel>
	</w:page>
</f:view>